package ddemo.dao;

import ddemo.pojo.Interface;
import ddemo.pojo.Parkinglot;
import ddemo.pojo.Parkingspot;

import java.util.List;

public interface ParkingspotMapper {
    @Select("SELECT * from `parkingspot` WHERE lotid = #{lotid}")
    public List<Parkingspot> searchparkingspot(@Param("lotid") Integer lotid);
    
    @Select("SELECT * from `parkingspot`")
    public List<Parkingspot> getParkingspot();

    @Select("DELETE FROM `parkingspot` WHERE id = #{id}")
    public int deleteParkingspot(@Param("id") Integer id);//    @Select("SELECT * from `parkingspot` WHERE userid = #{userid}")

    @Select("INSERT INTO `parkingspot` (lotid,usestatus,userid) VALUES (#{lotid},#{usestatus},#{userid})")
    public int addParkingspot(@Param("lotid") Integer lotid,@Param("usestatus") String usestatus,@Param("userid") Integer userid);//    public Interface park(@Param("userid") Integer userid);
}
